package Practice;

public class Test {
    public static void main(String[] args) {
        Student zs = new Student("张三",18,"北京","高三","001");
        zs.eat();
        zs.sleep();
        zs.sayHi();
        zs.study();

        Teacher ls = new Teacher("李四",30,"上海","5000");
        ls.eat();
        ls.sleep();
        ls.sayHi();
        ls.teach();

        Doctor ww = new Doctor("王五",40,"广州","主任医师");
        ww.eat();
        ww.sleep();
        ww.sayHi();
        ww.cut();
    }
}
//第二遍
/*
public class Teacher extends Person{
    String salary;
    Teacher(String name,int age,String address,String salary){
        super(name,age,address);
        this.salary = salary;
    }
    void teach(){
        System.out.println(name+"正在授课...");
    }
    void sayHi(){
        System.out.println("大家好,我叫"+name+",今年"+age+"岁了,家住"+address+"我是一名老师,我的工资是"+salary);
    }
}
 */
